package org.sixtynine.stock.util;

import java.io.FileInputStream;
import java.io.IOException;

/**
 * @author Thilanka
 * 
 */
public class FileUtil {

	public static void close(FileInputStream fis) {
		if (fis != null) {
			try {
				fis.close();
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}

	public static String getFileExtention(String fileName) {
		if (fileName != null && fileName.contains(".")) {
			int mid = fileName.lastIndexOf(".");
			return fileName.substring(mid + 1, fileName.length());
		}
		return null;
	}
}
